package com.sangmo.fts.api;

import com.sangmo.boot.framework.api.utils.ApiResponse;
import com.sangmo.boot.framework.common.security.meta.AccessLimit;
import com.sangmo.boot.framework.common.session.UserSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "/profile/v1")
public class ProfileApi {

//    @AccessLimit(seconds=30, maxCount=2, needLogin=true)
    @PostMapping(value = "/profile")
    public @ResponseBody
    ApiResponse<UserSession.Authorize> profile() {
        return ApiResponse.make(UserSession.getAuthorize());
    }
}
